package com.wingsfrog.travel.modules.dao;

import com.wingsfrog.travel.modules.entity.TeamTask;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

/**
 * Created by rankin on 16/4/2.
 */
public interface TeamTaskDao extends CrudRepository<TeamTask, Integer> {
    public TeamTask getTop1ByTeamIdOrderBySequenceDesc(Integer id);

    @Query("select count(t) from TeamTask t where t.teamId = ?1 ")
    public Long getCountByTeamId(Integer teamId);
}
